<template>
	<view>
		<view class="listbox" v-for="(item,index) in list" :key="index">
			<view class="userinfo">
				<!-- <view class="logobox">
					<image src="../../static/logo.png"></image>
				</view> -->
				<view class="rightbox">
					<view class="onebox">
						<view class="twobox">
							<view>专业度：</view>
							<uni-rate :readonly="true" color="#bbb" active-color="#FF6178" :value="item.major" :size="15"  style="margin-right: 20rpx;"/>
							<view>态度：</view>
							<uni-rate :readonly="true" color="#bbb" active-color="#FF6178" :value="item.manner" :size="15"/>
						</view>
						<!-- <view class="namebox" >茜茜</view> -->
						<view class="timebox">{{dateFormat(item.create_time)}}</view>
					</view>
					
				</view>
			</view>
			<view class="contentbox">
				{{item.content}}
			</view>
			<view class="imgbox" >
				<view class="imglist" v-for="(imgitem,imgindex) in item.img.split(',')" :key="imgindex">
					<image :src="imgitem"></image>
				</view>
			</view>
			<view class="classname">{{item.course_name}}</view>
			<view class="studentinfo">
				<image :src="item.wxPhotoURL"></image>
				<view>{{item.name}}  </view>
			</view>
			<!-- <view class="teachercomment">
				<view>老师对我的评价：：</view>
				<view class="starbox">
					<view>学习成果：</view>
					<uni-rate :readonly="true" color="#bbb" active-color="#FF6178" :value="2" :size="15" style="margin-right: 20rpx;"/>
					<view>作业方面：</view>
					<uni-rate :readonly="true" color="#bbb" active-color="#FF6178" :value="2" :size="15"/>
				</view>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		name:"teachercomment",
		props:{
			list:{
				type:Array,
				default:[]
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			dateFormat: function(value) {
				var date = new Date(value*1000); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
				var year = date.getFullYear();
				var month = ("0" + (date.getMonth() + 1)).slice(-2);
				var sdate = ("0" + date.getDate()).slice(-2);
				var hour = ("0" + date.getHours()).slice(-2);
				var minute = ("0" + date.getMinutes()).slice(-2);
				var second = ("0" + date.getSeconds()).slice(-2);
				// 拼接
				var result = year + "-" + month + "-" + sdate //+ "日 " //+ hour + ":" + minute //+ ":" + second;
				// 返回
				return result;
			},
		}
	}
</script>

<style lang="scss" scoped>
	.listbox{
		width: 690rpx;
		padding: 0 30rpx 20rpx 30rpx;
		background-color: #FFF;
		margin-top: 24rpx;
		.userinfo{
			display: flex;
			align-items: center;
			height: 100rpx;
			.logobox{
				width: 86rpx;
				image{
					width: 70rpx;
					height: 70rpx;
					border-radius: 100%;
				}
			}
			.rightbox{
				width: 690rpx;
				.onebox{
					width: 690rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					.twobox{
						display: flex;
						align-items: center;
						font-size: 24rpx;
						font-family: Source Han Sans CN-Regular, Source Han Sans CN;
						font-weight: 400;
						color: #555555;
						margin-top: 10rpx;
					}
					.namebox{
						width: 460rpx;
						-webkit-line-clamp: 1;
						display: -webkit-box;
						-webkit-box-orient: vertical;
						overflow: hidden;
						text-overflow: ellipsis;
					}
					.timebox{
						font-size: 28rpx;
						font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
						font-weight: normal;
						color: #555555;
					}
				}
				
			}
			
		}
		.contentbox{
			font-size: 28rpx;
			font-family: Source Han Sans CN-Medium, Source Han Sans CN;
			font-weight: 500;
			color: #222222;
			margin: 24rpx 0;
		}
		.imgbox{
			width: 100%;
			display: flex;
			flex-wrap: wrap;
			.imglist{
				width: 33.3%;
				text-align: center;
				image{
					width: 218rpx;
					height: 218rpx;
					border-radius: 8rpx;
					margin-bottom: 10rpx;
				}
			}
		}
		.classname{
			font-size: 24rpx;
			font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
			font-weight: normal;
			color: #888888;
		}
		.studentinfo{
			display: flex;
			align-items: center;
			font-size: 30rpx;
			font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
			font-weight: normal;
			color: #222222;
			margin-top: 40rpx;
			image{
				width: 70rpx;
				height: 70rpx;
				border-radius: 100%;
				margin-right: 16rpx;
			}
		}
		.teachercomment{
			width: 630rpx;
			padding:30rpx;
			border-radius: 24rpx;
			background: #FFF8F9;
			font-size: 28rpx;
			font-family: Source Han Sans CN-Medium, Source Han Sans CN;
			font-weight: 500;
			color: #FF6178;
			margin-top: 40rpx;
			.starbox{
				display: flex;
				align-items: center;
				font-size: 24rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #555555;
				margin-top: 20rpx;
			}
		}
	}

</style>